import axios from "./axios";


// 智能检测
// 天气情况
export const getWeather = (params: object) => {
    return axios({
        url: "http://v1.yiketianqi.com/api",
        params
    })
}

// 水电用量
export const getHdropower = () => {
    return axios({
        url: "http://localhost:3002/v1.0/api/intelligentDetection/dataTop"
    })
}

// 校园人员流动情况
export const getFlow = () => {
    return axios({
        url: "http://localhost:3002/v1.0/api/intelligentDetection/dataBottom"
    })
}


// 就业态势
// 毕业人员去向
export const getDestination = () => {
    return axios({
        url: "http://localhost:3002/v1.0/api/student/stats/distribution",
    })
}

// 毕业生工作状态
export const getState = () => {
    return axios({
        url: "http:/localhost:3002/v1.0/api/student/stats/status"
    })
}

// 地图
export const getMap = (adcode: number) => {
    return axios({
        url: `https://geo.datav.aliyun.com/areas_v3/bound/${adcode}_full.json`
    })
}

// 毕业生流向城市
export const getTrend = () => {
    return axios({
        url: "http://localhost:3002/v1.0/api/student/stats/distribution"
    })
}

// 毕业生薪资分布
export const getSalary = () => {
    return axios({
        url: 'http://localhost:3002/v1.0/api/student/stats/salary'
    })
}

// 安防管理
// 监控情况
export const getMonitor = (data: number) => {
    return axios({
        url: "http://localhost:3002/v1.0/api/safeManage/monitoringSituation",
        data
    })
}

// 门禁情况
export const getProhibit = () => {
    return axios({
        url: "http://localhost:3002/v1.0/api/safeManage/dutySituation"
    })
}

// 值班情况
export const getDuty = () => {
    return axios({
        url: "http://localhost:3002/v1.0/api/safeManage/entranceGuardSituation"
    })
}

// 监控画面
export const getFrame = (data: number) => {
    return axios({
        url: "http://localhost:3002/v1.0/api/safeManage/monitoringList",
        data
    })
}


// 设备运维
// 设备统计
export const getCount = () => {
    return axios({
        url: "http://localhost:3002/v1.0/api/deviceWorking/equipment"
    })
}

// 实时用电
export const getRealElectricity = () => {
    return axios({
        url: "http://localhost:3002/v1.0/api/deviceWorking/electricityConsumption"
    })
}

// 场地使用
export const getSite = () => {
    return axios({
        url: "http://localhost:3002/v1.0/api/deviceWorking/venueUse"
    })
}

// 设备检测
export const getDetection = () => {
    return axios({
        url: "http://localhost:3002/v1.0/api/deviceWorking/equipmentTesting"
    })
}

// 实时警报
export const getAlarm = () => {
    return axios({
        url: "http://localhost:3002/v1.0/api/deviceWorking/allPoliceData"
    })
}